package org.gw.ylc.base.repositories;

import org.gw.ylc.base.model.GradeMajor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface GradeMajorRepository extends CrudRepository<GradeMajor, String> {
	@Query("from GradeMajor g where g.department.id=?1 or ?1 is null")
	public List<GradeMajor> findByDepartment(String department);
}
